package com.lingnan.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lingnan.entity.po.JobApplication;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.util.Date;

@Data
public class JobPositionDto {
    private Long id;

    @NotNull(message = "HR ID不能为空")
    private Long hrId;

    @NotNull(message = "企业ID不能为空")
    private Long companyId;

    @NotBlank(message = "职位名称不能为空")
    @Size(max = 100, message = "职位名称长度不能超过100个字符")
    private String title;

    @Size(max = 50, message = "职位类型长度不能超过50个字符")
    private String type;

    @Size(max = 50, message = "薪资范围长度不能超过50个字符")
    private String salaryRange;

    @Size(max = 100, message = "工作地点长度不能超过100个字符")
    private String location;

    private String description;

    @Size(max = 50, message = "学历要求长度不能超过50个字符")
    private String eduRequirement;

    @Size(max = 50, message = "经验要求长度不能超过50个字符")
    private String expRequirement;

    @Min(value = 0, message = "状态必须为0-2之间")
    @Max(value = 2, message = "状态必须为0-2之间")
    private Integer status = 0;

    @Min(value = 0, message = "浏览量不能为负数")
    private Integer viewCount = 0;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Long updateId;

    //一对一：职位-职位投递
    private JobApplication jobApplication;
}
